<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<title>LinkExchanger ADMIN AREA</title>
</head>

<?
include_once '../global-includes.php';
include_once "menu.php";

echo "<body bgcolor=$bgcolor>";

if ($_GET[action] == delete AND $_GET[id]) {
BaseDbService::execute_select_query("DELETE FROM base WHERE id=$_GET[id]");
echo "<center><table cellpadding=3 width=500>";
echo "<tr><td><font face=$bigwrn_face size=$bigwrn_size color=$bigwrn_color><b>Посилання видалене!</b></font><hr size=1></td></tr>";
echo "</table></center>";
exit;
}


if ($_GET[id]) {
$record=BaseDbService::execute_select_query("select  id, nick, url, mail, category, htmltext, htmlimage FROM base WHERE id=$_GET[id]");
echo "<center><table cellpadding=3 width=500>";
echo "<tr><td colspan=2><font face=$bigwrn_face size=$bigwrn_size color=$bigwrn_color><b>Видалення посилання:</b></font><hr size=1></td></tr>";
echo "<tr><td colspan=2><font face=$font_face size=$font_size color=$font_color>Ви збираєтеся видалити наступні дані:</font></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>З категорії:</font></td><td align=right><input type=text name=category value='".$record[0][category]."' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>ID:</font></td><td align=right><input type=text name=id value='".$record[0][id]."' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>Ім'я або nickname:</font></td><td align=right><input type=text name=nick value='".$record[0][nick]."' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>URL сайту:</font></td><td align=right><input type=text name=url value='".$record[0][url]."' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>e-mail:</font></td><td align=right><input type=text name=mail value='".$record[0][mail]."' size=48></td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>Кнопка:</font></td><td align=right>".$record[0][htmlimage]."</td></tr>";
echo "<tr><td><font face=$font_face size=$font_size color=$font_color>Текстове посилання:</font></td><td align=right><font face=$font_face size=$font_size color=$font_color>".$record[0][htmltext]."</font></td></tr>";
echo "<tr><td colspan=2><hr size=1></td></tr>";
echo "<tr><td colspan=2 align=center><font face=$font_face size=$font_size color=$font_color>| <a href='$_SERVER[PHP_SELF]?id=".$record[0][id]."&action=delete'>Видалити</a> || <a href='index.php'>Не видаляти</a> |</font></td></tr>";
echo "</table></center>";
}

?>
</body>
</html>
